#!/usr/bin/env python
# -*- coding:UTF-8 -*-
"""
adapter.py
适配器模式代码原型
"""

class Target(object):
    def show(self): return '{}.{}'.format(self.__class__, self.show.__name__)

class Adaptee(object):
    def show(self): pass

class Adapter(Adaptee):
    def __init__(self): self._target = Target()
    def show(self): print(self._target.show())
